import requests

ruleName="围栏103"
url = "https://gwza.tpddns.cn:8897/api/system/rules/list?pageNum=1&pageSize=10&name={}&worksiteId=21&flag=0&freezeFlag=&orderByColumn=update_time&isAsc=desc".format(ruleName)

headers = {
  'Accept': 'application/json, text/plain, */*',
  'Authorization': 'Bearer eyJhbGciOiJIUzUxMiJ9.eyJsb2dpbl91c2VyX2tleSI6IjlhMzI0ZmI1LWRiYzQtNGEzZS04ZGE1LTQ0MWU5ZGNmMDgwOCJ9.eu4I6rsExfgNXXNZOejovblIpl9z88cBdkHbgRwgIwtWJP0O6MVzNNaIj6KuDYy_WHd8rEchyQc_KoXFayNgpA',
}
res = requests.post(url, headers=headers,verify=False)
print(res.text)
#获取对应围栏名称的id
id = res.json()["rows"][0]["id"]
print(id)



